import getpass
import os
from langchain_openai import AzureChatOpenAI

def _set_env(var: str):
    if not os.environ.get(var):
        os.environ[var] = getpass.getpass(f"{var}: ")


_set_env("TAVILY_API_KEY")
params = {
    "azure_endpoint": "https://azs-dev-us-01.openai.azure.com/",
    "openai_api_key": "73cf593826a54526bebd341aa0ca551e",
    "model_name": "gpt-3.5-turbo",
    "deployment_name": "gpt-4o",
    "openai_api_version": "2023-07-01-preview",
    "temperature": 0,
    "max_tokens": 4096,
    "top_p": 0,
    "frequency_penalty": 0,
    "presence_penalty": 0,
    "streaming": False,
    "request_timeout": 600,
    "max_retries": 0,
}


def getLLM():
    llm = AzureChatOpenAI(**params)
    return llm
